/****************************************************************************
 * Chariott - Continuous Integration Testing Tool
 * Zaid Mohsin
 * The University of York
 * 2012/2013
 * MSc in Information Technology
 * All rights reserved.
 ****************************************************************************/
package chariott.main;

import java.beans.PropertyChangeListener;
import java.util.Map;

public interface CloudConnectable {

	/**
	 * creates a client interface to connect to the cloud compute services
	 * 
	 */
	public void clientConnect();

	/**
	 * returns the name of the instances and IP addresses in a map
	 * 
	 * @return
	 */
	public Map<String, String> runInstances(int numOfInstances);

	/**
	 * stops all cloud instances
	 * 
	 */
	public void stopInstances();

	/**
	 * attach listeners to this object so they can detect any changes in status
	 * 
	 * @param newListener
	 */
	public void addChangeListener(PropertyChangeListener newListener);

	/**
	 * notify listeners if any message has been changed
	 * 
	 * @param obj
	 * @param hostname
	 * @param newStatus
	 * @param oldStatus
	 */
	public void notifyListeners(Object obj, String hostname, String newStatus,
			String oldStatus);

}
